In [2]:
val xOpt = Option(1)
val values = Array(1, 2, 3)
for {
x <- xOpt
value <- values
} yield value
In [3]:
for {
x <- xOpt.toSeq // need
value <- values
} yield value
In [6]:
Option(1).toSeq
In [5]:
None.toSeq
In [ ]: